package com.isunland.managesystem.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import com.isunland.managesystem.entity.BookOrderInfo;

/**
 * 对象功能: 添加预约订单
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: wangyanan
 * 创建时间: 2016/12/16 15:44
 */

public class AppointmentOrderUpdateActivity extends SingleFragmentActivity {
  private BookOrderInfo mItem;

  @Override public void onCreate(Bundle arg0) {
    mItem = (BookOrderInfo) getIntent().getSerializableExtra(
        AppointmentOrderUpdateFragment.EXTRA_DETAIL);
    super.onCreate(arg0);
  }

  @Override protected Fragment createFragment() {
    return AppointmentOrderUpdateFragment.newInstance(mItem);
  }

  public static void newInstance(android.support.v4.app.Fragment fragment, Activity context,
      BookOrderInfo item, int requestCode) {
    if (fragment == null || context == null) return;
    Intent intent = new Intent(context, AppointmentOrderUpdateActivity.class);
    intent.putExtra(AppointmentOrderUpdateFragment.EXTRA_DETAIL, item);
    fragment.startActivityForResult(intent, requestCode);
  }
}


